package de.fmannan.addbook.views;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;

import de.fmannan.addbook.MyImageRegistry;

/**
 * @author fmannan
 * 
 * Provides the Model for the {@link ContactTableView}.
 */
public class TableViewerModel {

	// All Column headers of the table
	private final static String[] columnNames = { "Name", "Phone (Home)",
			"Phone (Office)", "Email" };
	// On startup every single column has to be force-update for every contact
	private static TableColumn [] tablecolumn = new TableColumn[4];
	
	/**
	 * Creates the column-header for the given table, but does not fill it with
	 * Data yet.
	 */
	public static void createColumns(Table table) {
		for(int i = 0; i < columnNames.length; i++) {
			tablecolumn[i] = new TableColumn(table, SWT.NONE);
			tablecolumn[i].setText(columnNames[i]);
			tablecolumn[i].setWidth(100);
		}		
	}
}
